<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<title><?php echo ($name); ?> <?php echo ($site_name); ?> <?php echo ($site_seo_title); ?></title>
<meta name="keywords" content="<?php echo ($site_seo_keywords); ?>" />
<meta name="description" content="<?php echo ($site_seo_description); ?>" />
<link rel="icon" href="/yxtcmf/public/simplebootx/public/images/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="/yxtcmf/public/simplebootx/public/images/favicon.ico" type="image/x-icon" media="screen" />
<link href="/yxtcmf/public/simplebootx/public/css/bootstrap.css" rel="stylesheet" />
<link rel="stylesheet" media="screen" href="/yxtcmf/public/simplebootx/public/css/common.css" />
<link rel="stylesheet" media="screen" href="/yxtcmf/public/simplebootx/public/css/main.css" />
<link rel="stylesheet" media="screen" href="/yxtcmf/public/simplebootx/public/css/es-icon.css" />
<link rel="stylesheet" media="screen" href="/yxtcmf/public/simplebootx/public/css/iconfont.css" />
<link href="/yxtcmf/public/simpleboot/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" media="screen" href="/yxtcmf/public/simplebootx/public/css/theme.css" />
<link rel="stylesheet" media="screen" href="/yxtcmf/public/pintuer/pintuer.css" />
<link href="/yxtcmf/public/js/artDialog/skins/default.css" rel="stylesheet" />
<!--[if lt IE 9]>    
	<script src="/yxtcmf/public/simplebootx/public/js/html5shiv.js"></script>   
	<script src="/yxtcmf/public/simplebootx/public/js/respond.min.js"></script>  
<![endif]-->
</head>
<body>	
	<header class="navbar">		
		<div class="container">			
			<div class="clearfix navbar-top">				
				<a href="/yxtcmf/"><img src="/yxtcmf/public/simplebootx/public/images/logo.png" class="pull-left logo-left"></a>				
				<button class="navbar-toggle pull-left" type="button" data-toggle="collapse" data-target=".navbar-collapse">		
					<span class="sr-only">Toggle navigation</span>			
					<span class="icon-bar"><i class="iconfont icon-gengduo"></i></span>		
					<span class="icon-bar"></span>				
					<span class="icon-bar"></span>				
				</button>				
				<form class="navbar-form hidden-xs" role="search" action="<?php echo u('Course/Course/search');?>" method="post">					
					<div class="form-group">					
						<input type="search" placeholder="搜索课程" class="form-control js-search" name="keywords">				
					</div>					
					<button type="submit" class="button iconfont icon-search"></button>				
				</form>				
				<!--<a class="pull-right hidden-xs">					
					<i class="iconfont icon-mianfeidianhua icon"></i>				
					<span class="telephone">全国服务热线：<?php echo ($kefu_tel); ?></span>			
				</a>-->			
				<!--<div class="navbar-user pull-right visible-xs"  style="top:16px;" >					
				<?php if(session('?user')): ?><ul class="nav navbar-nav navbar-right">														
						<li class="info-img">
							<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> 		
								<span><?php echo ($user_nicename); ?></span> <i class="iconfont icon-xia"></i> 
							</a>								
									<ul class="dropdown-menu menu-ul" role="menu">									
										<li><a href="<?php echo U('User/Center/setting');?>">
											<i class="iconfont icon-shezhi"></i>个人设置</a></li>										
										<li><a href="<?php echo u('user/center/count');?>"><i class="iconfont icon-001"></i> 账户中心</a></li>										
											<li><a href="<?php echo u('user/center/application');?>"><i class="iconfont icon-001"></i> 成为教师</a></li>								
										<li><a href="<?php echo U('user/index/logout');?>"><i class="iconfont icon-tuichu"></i>退出登录</a></li>									
									</ul>								
						</li>					
					</ul>					
				<?php else: ?>						
					<ul class="nav navbar-nav navbar-right">							
						<li><a href="<?php echo leuu('User/Login/index');?>"> 登录</a></li>							
						<!--<li>｜</li>							
						<li><a href="<?php echo leuu('User/Register/index');?>">注册</a></li>			
					</ul><?php endif; ?>-->				
				</div>			
			</div>		
		</div>		
		<nav class="nav-collapse">			
			<div class="container">				
				<div class="navbar-header">					
					<ul class="nav navbar-left navbar-collapse collapse">						
						<li class=""><a href="/yxtcmf/" class="">首页 </a></li>						
						<li class=""><a href="<?php echo leuu('Course/Course/coursecenter');?>" class="">精品课程</a></li>						
						<!--<li class=""><a href="<?php echo leuu('Teacher/Teacher/index');?>" class="">金牌讲师</a></li>						
						<li class=""><a href="<?php echo leuu('Exam/Shiti/index');?>" class="">在线题库</a></li>-->						
						<li class=""><a href="<?php echo leuu('Portal/Index/article');?>" class="">党建新闻</a></li>						
						<!--<li class=""><a href="<?php echo leuu('Forum/Plate/index');?>" class="">交流论坛</a></li>-->						
						<?php if(is_array($nav)): $i = 0; $__LIST__ = $nav;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li class=""><a href="<?php echo (sp_get_href($vo['href'])); ?>" class=""><?php echo ($vo['label']); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>					
					</ul>				
				</div>				
				<div class="navbar-user hidden-xs">				
					<ul class="nav navbar-nav navbar-right">						
					<?php if(session('?user')): ?><ul class="nav navbar-nav navbar-right">							
							<?php if($user_type == 3): ?><li><a href="<?php echo u('Teacher/Center/index');?>" class="nav-study">我的教室</a></li>							
							<?php else: ?>								
								<li><a href="<?php echo u('User/Center/index');?>" class="nav-study">我的教室</a></li><?php endif; ?>								
								<li class="info-img">
									<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> 				
										<?php if(empty($avatar)): ?><img src="/yxtcmf/public/simplebootx/public/images/093958e59110293063.jpg" class="img-circle" />		
										<?php else: ?> 										
											<img src="<?php echo sp_get_user_avatar_url($avatar);?>?t=<?php echo time();?>" class="img-circle" /><?php endif; ?> 									
										<span><?php echo ($user_nicename); ?></span> <i class="icon-caret-down"></i> 
									</a>									
									<ul class="dropdown-menu menu-ul" role="menu">								
										<li><a href="<?php echo u('User/Center/setting');?>"><i class="icon-cogs"></i>个人设置</a></li>		
										<li><a href="<?php echo u('user/center/count');?>"><i class="icon-desktop"></i> 账户中心</a></li>	
										<li><a href="<?php echo u('user/center/application');?>"><i class="icon-graduation-cap"></i> 成为教师</a></li>	
										<li><a href="<?php echo U('user/index/logout');?>"><i class="icon-power-off"></i>退出登录</a></li>	
									</ul>								
								</li>						
						</ul>					
					<?php else: ?>				
						<ul class="nav navbar-nav navbar-right">							
							<li><a href="<?php echo leuu('User/Login/index');?>"> <span class="glyphicon glyphicon-log-in"></span>&nbsp&nbsp登录</a></li>	
							<!--<li><a href="<?php echo leuu('User/Register/index');?>"><span class="glyphicon glyphicon-user"></span>&nbsp&nbsp注册</a></li>-->	
						</ul><?php endif; ?>					
					</ul>				
				</div>			
			</div>		
		</nav>    
	</header>  
<script type="text/javascript">
var GV = {
    DIMAUB: "/yxtcmf/",
    JS_ROOT: "public/js/",
    TOKEN: ""
};
</script>
<script>
	  
</script>
<script src="/yxtcmf/public/js/jquery.js"></script>
<script src="/yxtcmf/public/js/wind.js"></script>
<script src="/yxtcmf/public/js/bootstrap.min.js"></script>
<script src="/yxtcmf/public/js/frontend.js"></script>
<script src="/yxtcmf/public/js/artDialog/artDialog.js"></script>
<div id="content-container" class="container">
	<div class="es-section testpaper-heading">
		<div class="testpaper-titlebar clearfix">
			<h1 class="testpaper-title"><?php echo ($title); ?><br><small class="text-sm">答题人：<?php echo (getusername($result["userid"])); ?> &nbsp&nbsp&nbsp交卷时间：<?php echo ($result['addtime']); ?> </small></h1>
			<div class="testpaper-status">  
				<?php if($result['readover'] == 0): ?><div class="label label-info">批阅中</div>
				<?php else: ?>
				    <div class="label label-info">已批阅</div><?php endif; ?>				
			</div>
		</div>

		<div class="media testpaper-result">
			<div class="testpaper-result-total">
				<div class="well">
				    <?php if($result['readover'] == 0): ?><div class="testpaper-result-total-score">?<small>分</small></div>
					<?php else: ?>
					    <div class="testpaper-result-total-score"><?php echo ($usertotlescore); ?><small>分</small></div><?php endif; ?>
					<small class="text-muted">总分<?php echo ($totlescore); ?>分</small>
				</div>
			</div>
			<div class="media-body">
				<div class="table-responsive">
					<table class="table table-bordered table-condensed testpaper-result-table">
						<thead>
							<th></th>
							<?php if($single_choice_num > 0): ?><th>选择题 <small class="text-muted">(<?php echo ($single_choice_num); ?>道)</small></th><?php endif; ?>  
							<?php if($fill_num > 0): ?><th>填空题 <small class="text-muted">(<?php echo ($fill_num); ?>道)</small></th><?php endif; ?> 	
							<?php if($determine_num > 0): ?><th>判断题 <small class="text-muted">(<?php echo ($determine_num); ?>道)</small></th><?php endif; ?> 
							<?php if($essay_num > 0): ?><th>问答题 <small class="text-muted">(<?php echo ($essay_num); ?>道)</small></th><?php endif; ?> 	
							<?php if($material_num > 0): ?><th>材料题 <small class="text-muted">(<?php echo ($material_num); ?>道)</small></th><?php endif; ?> 	
						</thead>
						<tbody>
							<tr>
								<th>得分</th>
								<?php if($single_choice_num > 0): ?><td><span class="text-success"><?php echo ($result['choicescore']); ?><small>分</small></span></td><?php endif; ?>
								<?php if($fill_num > 0): if(empty($totalfilescore)): ?><td><span class="text-warning"> <small>批阅中</small></span></td>
									<?php else: ?>
										<td><span class="text-success"><?php echo ($totalfilescore); ?> <small>分</small></span></td><?php endif; endif; ?>	
								<?php if($determine_num > 0): ?><td><span class="text-success"><?php echo ($result['determinescore']); ?> <small>分</small></span></td><?php endif; ?>	
								<?php if($essay_num > 0): if(empty($totalessayscore)): ?><td><span class="text-warning"><small>批阅中</small></span></td>
									<?php else: ?>
										<td><span class="text-success"><?php echo ($totalessayscore); ?> <small>分</small></span></td><?php endif; endif; ?>	
								<?php if($material_num > 0): if(empty($totalmaterialscore)): ?><td><span class="text-warning"><small>批阅中</small></span></td>
									<?php else: ?>
										<td><span class="text-success"><?php echo ($totalmaterialscore); ?> <small>分</small></span></td><?php endif; endif; ?>	
							</tr>
							
						</tbody>
					</table>
				</div>
			</div>
		</div>  
	</div>
	<?php if($result['readover'] == 0): ?><div class="alert alert-warning">试卷批阅中，请稍等...</div><?php endif; ?>		
    <form name="myform" id="myform" action="<?php echo u('Exam/Shiti/dopaperspost');?>" method="post" class="form-horizontal js-ajax-form">
		<div class="row">
			<div class="col-md-12 prevent-copy">
				<div class="testpaper-body" >
					
					<?php if(!empty($single_choice)): ?><div class="panel panel-default testpaper-question-block" id="single_choice">
							<div class="panel-heading"><strong class="">选择题</strong>
								<small class="text-muted">共<?php echo ($single_choice_num); ?>题，每题<?php echo ($data['single_choice_score']); ?>分，共<?php echo ($single_choice_num*$data['single_choice_score']); ?>分 </small>
							</div>
							<div class="panel-body">
								<?php if(is_array($single_choice)): foreach($single_choice as $k=>$vo): ?><div class="testpaper-question testpaper-question-choice " id="<?php echo ($k+1); ?>">
									    <script>
											var div = document.getElementsByTagName('div');
											//alert(div[div.length - 1].id);
										</script> 
										<div class="testpaper-question-body">
											<div class="testpaper-question-stem-wrap clearfix">
												<div class="testpaper-question-seq-wrap">
													<div class="testpaper-question-seq"><?php echo ($k+1); ?></div>
													<div class="testpaper-question-score"><?php echo ($data['single_choice_score']); ?>.0分</div>
												</div>
												<div class="testpaper-question-stem">
													<?php echo ($vo['stem']); ?>
												</div>
											</div>
											<ul class="testpaper-question-choices">
												<li class=""><span class="testpaper-question-choice-index">A.</span> <p><?php echo ($vo['xa']); ?></p></li>
												<li class=""><span class="testpaper-question-choice-index">B.</span> <p><?php echo ($vo['xb']); ?></p></li>
												<li class=""><span class="testpaper-question-choice-index">C.</span> <p><?php echo ($vo['xc']); ?></p></li>
												<li class=""><span class="testpaper-question-choice-index">D.</span> <p><?php echo ($vo['xd']); ?></p></li>
											</ul>
										</div>
										<div class="testpaper-question-footer clearfix">
											
											<div class="testpaper-question-result">
												<div class="testpaper-question-result-suggested">
													<div class="testpaper-question-result-title">正确答案：<strong class="text-success"><?php echo ($vo['daan']); ?>&nbsp&nbsp&nbsp&nbsp</strong>
														<?php if($vo['result']==1): ?>你的答案是 <strong class="text-success"><?php echo ($vo['userdaan']); ?>&nbsp&nbsp&nbsp&nbsp回答正确</strong>
														<?php else: ?>
															你的答案是 <strong class="text-danger"><?php echo ($vo['userdaan']); ?>&nbsp&nbsp&nbsp&nbsp回答错误</strong><?php endif; ?>
													</div>
												</div>
												
												<div class="testpaper-question-score mtl">
												    <?php if($vo['result']==1): ?><div class="testpaper-question-result-title">本题得分：<?php echo ($data['single_choice_score']); ?>分</div>
														<input type="hidden" value="btn-success" id="<?php echo ($k+1+200000); ?>"> </input>
													<?php else: ?>
													    <div class="testpaper-question-result-title">本题得分：0 分</div><?php endif; ?>
												</div>
											</div>
											<div class="testpaper-question-actions pull-right">
											
												<a class="btn btn-sm btn-link analysis-btn" id="<?php echo ($vo['id']+10000); ?>"><span class="glyphicon glyphicon-chevron-down"></span> 展开解析</a>
												<a class="btn btn-sm btn-link unanalysis-btn" id="<?php echo ($vo['id']+20000); ?>" style="display:none"><span class="glyphicon glyphicon-chevron-up"></span> 收起解析</a>
												 <?php if($vo['iserror']==0): ?><a  class="btn btn-sm btn-default favorite-btn_1" id="<?php echo ($vo['id']+60000); ?>" ><span class="glyphicon glyphicon-star-empty"></span> 添加到错题本</a>
												 <?php else: ?>	
													<a  class="btn btn-link btn-sm unfavorite-btn_1" id="<?php echo ($vo['id']+70000); ?>"><span class="glyphicon glyphicon-star"></span> 从错题本中移除</a><?php endif; ?>
												<a  class="btn btn-sm btn-default favorite-btn" id="<?php echo ($vo['id']+40000); ?>" style="display:none"><span class="glyphicon glyphicon-star-empty"></span> 添加到错题本</a>
												<a  class="btn btn-link btn-sm unfavorite-btn"  id="<?php echo ($vo['id']+50000); ?>" style="display:none"><span class="glyphicon glyphicon-star"></span> 从错题本中移除</a>
											</div>
                                              
										</div>
										<div class="testpaper-question-analysis well" id="<?php echo ($vo['id']+30000); ?>" style="margin-top:10px;display:none;" >
											<?php echo ($vo['analysis']); ?>
										</div>
									</div><?php endforeach; endif; ?>    
							</div>
						</div><?php endif; ?>
					<?php if(!empty($fill)): ?><div class="panel panel-default testpaper-question-block" id="fill">
							<div class="panel-heading"><strong class="">填空题</strong>
								<small class="text-muted">共<?php echo ($fill_num); ?>题，每题<?php echo ($data['fill_score']); ?>分，共<?php echo ($fill_num*$data['fill_score']); ?>分</small>
							</div>
							<div class="panel-body">
								<?php if(is_array($fill)): foreach($fill as $k=>$vo): ?><div class="testpaper-question testpaper-question-fill "  id="<?php echo ($single_choice_num+$k+1); ?>">
										<div class="testpaper-question-body">
											<div class="testpaper-question-stem-wrap clearfix">
												<div class="testpaper-question-seq-wrap">
													<div class="testpaper-question-seq"><?php echo ($single_choice_num+$k+1); ?></div>
													<div class="testpaper-question-score"><?php echo ($data['fill_score']); ?>.0分</div>
												</div>
												<div class="testpaper-question-stem">
													<?php echo ($vo['stem']); ?>
												</div>
											</div>
										</div>
										<div class="testpaper-question-footer clearfix">
											<div class="testpaper-question-result">
												<div class="testpaper-question-result-suggested">
													<div class="testpaper-question-result-title">参考答案：</div>
													<div><strong class="text-success"><?php echo ($vo['daan']); ?></strong></div>
												</div>
												<div class="testpaper-question-result-your">
													<div class="testpaper-question-result-title">你的回答：</div>
													<div><?php echo ($vo['userdaan']); ?></div>
												</div>
												<div class="testpaper-question-score mtl">
													<?php if(empty($vo['score'])): ?><div class="testpaper-question-result-title">老师正在批阅！</div>
													<?php else: ?>	
														<div class="testpaper-question-result-title">本题得分：<?php echo ($vo['score']); ?>分</div><?php endif; ?>
												</div>
											</div>
											<div class="testpaper-question-actions pull-right">
												<a class="btn btn-sm btn-link analysis-btn" id="<?php echo ($vo['id']+10000); ?>"><span class="glyphicon glyphicon-chevron-down"></span> 展开解析</a>
												<a class="btn btn-sm btn-link unanalysis-btn" id="<?php echo ($vo['id']+20000); ?>" style="display:none"><span class="glyphicon glyphicon-chevron-up"></span> 收起解析</a>
												 <?php if($vo['iserror']==0): ?><a  class="btn btn-sm btn-default favorite-btn_1" id="<?php echo ($vo['id']+60000); ?>" ><span class="glyphicon glyphicon-star-empty"></span> 添加到错题本</a>
												 <?php else: ?>	
													<a  class="btn btn-link btn-sm unfavorite-btn_1" id="<?php echo ($vo['id']+70000); ?>"><span class="glyphicon glyphicon-star"></span> 从错题本中移除</a><?php endif; ?>
												<a  class="btn btn-sm btn-default favorite-btn" id="<?php echo ($vo['id']+40000); ?>" style="display:none"><span class="glyphicon glyphicon-star-empty"></span> 添加到错题本</a>
												<a  class="btn btn-link btn-sm unfavorite-btn"  id="<?php echo ($vo['id']+50000); ?>" style="display:none"><span class="glyphicon glyphicon-star"></span> 从错题本中移除</a>
											</div>
                                              
										</div>
										<div class="testpaper-question-analysis well" id="<?php echo ($vo['id']+30000); ?>" style="margin-top:10px;display:none;" >
											<?php echo ($vo['analysis']); ?>
										</div>
									</div><?php endforeach; endif; ?>    	
							</div>
						</div><?php endif; ?>
					<?php if(!empty($determine)): ?><div class="panel panel-default testpaper-question-block" id="determine">
						    <?php $daan=array("1"=>"√","2"=>"×"); ?>
							<div class="panel-heading"><strong class="">判断题</strong>
								<small class="text-muted">共<?php echo ($determine_num); ?>题，每题<?php echo ($data['determine_score']); ?>分，共<?php echo ($determine_num*$data['determine_score']); ?>分</small>
							</div>
							<div class="panel-body">
								<?php if(is_array($determine)): foreach($determine as $k=>$vo): ?><div class="testpaper-question testpaper-question-determine "  id="<?php echo ($single_choice_num+$fill_num+$k+1); ?>">
										<div class="testpaper-question-body">
											<div class="testpaper-question-stem-wrap clearfix">
												<div class="testpaper-question-seq-wrap">
													<div class="testpaper-question-seq"><?php echo ($single_choice_num+$fill_num+$k+1); ?></div>
													<div class="testpaper-question-score"><?php echo ($data['determine_score']); ?>.0分</div>
												</div>
												<div class="testpaper-question-stem">
													<?php echo ($vo['stem']); ?>
												</div>
											</div>
										</div>
										<div class="testpaper-question-footer clearfix">
											<div class="testpaper-question-result">
												<div class="testpaper-question-result-suggested">
													<div class="testpaper-question-result-title">正确答案：<strong class="text-success"><?php echo ($daan[$vo['daan']]); ?>&nbsp&nbsp&nbsp&nbsp</strong>
														<?php if($vo['result']==1): ?>你的答案是 <strong class="text-success"><?php echo ($daan[$vo['userdaan']]); ?>&nbsp&nbsp&nbsp&nbsp回答正确</strong>
														<?php else: ?>
															你的答案是 <strong class="text-danger"><?php echo ($daan[$vo['userdaan']]); ?>&nbsp&nbsp&nbsp&nbsp回答错误</strong><?php endif; ?>
													</div>
												</div>
												
												<div class="testpaper-question-score mtl">
												    <?php if($vo['result']==1): ?><div class="testpaper-question-result-title">本题得分：<?php echo ($data['single_choice_score']); ?>分</div>
													<?php else: ?>
													    <div class="testpaper-question-result-title">本题得分：0 分</div><?php endif; ?>
												</div>
											</div>
											<div class="testpaper-question-actions pull-right">
												<a class="btn btn-sm btn-link analysis-btn" id="<?php echo ($vo['id']+10000); ?>"><span class="glyphicon glyphicon-chevron-down"></span> 展开解析</a>
												<a class="btn btn-sm btn-link unanalysis-btn" id="<?php echo ($vo['id']+20000); ?>" style="display:none"><span class="glyphicon glyphicon-chevron-up"></span> 收起解析</a>
												 <?php if($vo['iserror']==0): ?><a  class="btn btn-sm btn-default favorite-btn_1" id="<?php echo ($vo['id']+60000); ?>" ><span class="glyphicon glyphicon-star-empty"></span> 添加到错题本</a>
												 <?php else: ?>	
													<a  class="btn btn-link btn-sm unfavorite-btn_1" id="<?php echo ($vo['id']+70000); ?>"><span class="glyphicon glyphicon-star"></span> 从错题本中移除</a><?php endif; ?>
												<a  class="btn btn-sm btn-default favorite-btn" id="<?php echo ($vo['id']+40000); ?>" style="display:none"><span class="glyphicon glyphicon-star-empty"></span> 添加到错题本</a>
												<a  class="btn btn-link btn-sm unfavorite-btn"  id="<?php echo ($vo['id']+50000); ?>" style="display:none"><span class="glyphicon glyphicon-star"></span> 从错题本中移除</a>
											</div>
                                              
										</div>
										<div class="testpaper-question-analysis well" id="<?php echo ($vo['id']+30000); ?>" style="margin-top:10px;display:none;" >
											<?php echo ($vo['analysis']); ?>
										</div>
									</div><?php endforeach; endif; ?>
							</div>
						</div><?php endif; ?>	
					<?php if(!empty($essay)): ?><div class="panel panel-default testpaper-question-block" id="essay">
							<div class="panel-heading"><strong class="">问答题</strong>
								<small class="text-muted">共<?php echo ($essay_num); ?>题，每题<?php echo ($data['essay_score']); ?>分，共<?php echo ($essay_num*$data['essay_score']); ?>分 </small>
							</div>
							<div class="panel-body">
								<?php if(is_array($essay)): foreach($essay as $k=>$vo): ?><div class="testpaper-question testpaper-question-essay " id="<?php echo ($single_choice_num+$fill_num+$determine_num+$k+1); ?>">
										<div class="testpaper-question-body">
											<div class="testpaper-question-stem-wrap clearfix">
												<div class="testpaper-question-seq-wrap">
													<div class="testpaper-question-seq"><?php echo ($single_choice_num+$fill_num+$determine_num+$k+1); ?></div>
													<div class="testpaper-question-score"><?php echo ($data['essay_score']); ?>.0分</div>
												</div>
												<div class="testpaper-question-stem">
													<?php echo ($vo['stem']); ?>
												</div>
											</div>
										</div>
										<div class="testpaper-question-footer clearfix">
											<div class="testpaper-question-result">
												<div class="testpaper-question-result-suggested">
													<div class="testpaper-question-result-title">参考答案：</div>
													<div><strong class="text-success"><?php echo ($vo['daan']); ?></strong></div>
												</div>
												<div class="testpaper-question-result-your">
													<div class="testpaper-question-result-title">你的回答：</div>
													<div><?php echo ($vo['userdaan']); ?></div>
												</div>
												<div class="testpaper-question-score mtl">
													<?php if(empty($vo['score'])): ?><div class="testpaper-question-result-title">老师正在批阅！</div>
													<?php else: ?>	
														<div class="testpaper-question-result-title">本题得分：<?php echo ($vo['score']); ?>分</div><?php endif; ?>
												</div>
											</div>
											<div class="testpaper-question-actions pull-right">
												<a class="btn btn-sm btn-link analysis-btn" id="<?php echo ($vo['id']+10000); ?>"><span class="glyphicon glyphicon-chevron-down"></span> 展开解析</a>
												<a class="btn btn-sm btn-link unanalysis-btn" id="<?php echo ($vo['id']+20000); ?>" style="display:none"><span class="glyphicon glyphicon-chevron-up"></span> 收起解析</a>
												 <?php if($vo['iserror']==0): ?><a  class="btn btn-sm btn-default favorite-btn_1" id="<?php echo ($vo['id']+60000); ?>" ><span class="glyphicon glyphicon-star-empty"></span> 添加到错题本</a>
												 <?php else: ?>	
													<a  class="btn btn-link btn-sm unfavorite-btn_1" id="<?php echo ($vo['id']+70000); ?>"><span class="glyphicon glyphicon-star"></span> 从错题本中移除</a><?php endif; ?>
												<a  class="btn btn-sm btn-default favorite-btn" id="<?php echo ($vo['id']+40000); ?>" style="display:none"><span class="glyphicon glyphicon-star-empty"></span> 添加到错题本</a>
												<a  class="btn btn-link btn-sm unfavorite-btn"  id="<?php echo ($vo['id']+50000); ?>" style="display:none"><span class="glyphicon glyphicon-star"></span> 从错题本中移除</a>
											</div>
                                              
										</div>
										<div class="testpaper-question-analysis well" id="<?php echo ($vo['id']+30000); ?>" style="margin-top:10px;display:none;" >
											<?php echo ($vo['analysis']); ?>
										</div>
									</div><?php endforeach; endif; ?>    	
							</div>
						</div><?php endif; ?>
					<?php if(!empty($material)): ?><div class="panel panel-default testpaper-question-block" id="material">
							<div class="panel-heading"><strong class="">材料题</strong>
								<small class="text-muted">共<?php echo ($material_num); ?>题，每题<?php echo ($data['material_score']); ?>分，共<?php echo ($material_num*$data['material_score']); ?>分</small>
							</div>
							<div class="panel-body">
								<?php if(is_array($material)): foreach($material as $k=>$vo): ?><div class="testpaper-question testpaper-question-material "  id="<?php echo ($single_choice_num+$fill_num+$determine_num+$essay_num+$k+1); ?>">
										<div class="testpaper-question-body">
											<div class="testpaper-question-stem-wrap clearfix">
												<div class="testpaper-question-seq-wrap">
													<div class="testpaper-question-seq"><?php echo ($single_choice_num+$fill_num+$determine_num+$essay_num+$k+1); ?></div>
													<div class="testpaper-question-score"><?php echo ($data['material_score']); ?>.0分</div>
												</div>
												<div class="testpaper-question-stem">
													<?php echo ($vo['stem']); ?>
												</div>
												
											</div>
										</div>
										<div class="testpaper-question-footer clearfix">
											<div class="testpaper-question-result">
												<div class="testpaper-question-result-suggested">
													<div class="testpaper-question-result-title">参考答案：</div>
													<div><strong class="text-success"><?php echo ($vo['daan']); ?></strong></div>
												</div>
												<div class="testpaper-question-result-your">
													<div class="testpaper-question-result-title">你的回答：</div>
													<div><?php echo ($vo['userdaan']); ?></div>
												</div>
												<div class="testpaper-question-score mtl">
													<?php if(empty($vo['score'])): ?><div class="testpaper-question-result-title">老师正在批阅！</div>
													<?php else: ?>	
														<div class="testpaper-question-result-title">本题得分：<?php echo ($vo['score']); ?>分</div><?php endif; ?>
												</div>
											</div>
											<div class="testpaper-question-actions pull-right">
												<a  class="btn btn-sm btn-link analysis-btn" id="<?php echo ($vo['id']+10000); ?>"><span class="glyphicon glyphicon-chevron-down"></span> 展开解析</a>
												<a  class="btn btn-sm btn-link unanalysis-btn" id="<?php echo ($vo['id']+20000); ?>" style="display:none"><span class="glyphicon glyphicon-chevron-up"></span> 收起解析</a>
												 <?php if($vo['iserror']==0): ?><a  class="btn btn-sm btn-default favorite-btn_1" id="<?php echo ($vo['id']+60000); ?>" ><span class="glyphicon glyphicon-star-empty"></span> 添加到错题本</a>
												 <?php else: ?>	
													<a  class="btn btn-link btn-sm unfavorite-btn_1" id="<?php echo ($vo['id']+70000); ?>"><span class="glyphicon glyphicon-star"></span> 从错题本中移除</a><?php endif; ?>
												<a  class="btn btn-sm btn-default favorite-btn" id="<?php echo ($vo['id']+40000); ?>" style="display:none"><span class="glyphicon glyphicon-star-empty"></span> 添加到错题本</a>
												<a  class="btn btn-link btn-sm unfavorite-btn"  id="<?php echo ($vo['id']+50000); ?>" style="display:none"><span class="glyphicon glyphicon-star"></span> 从错题本中移除</a>
											</div>
                                              
										</div>
										<div class="testpaper-question-analysis well" id="<?php echo ($vo['id']+30000); ?>" style="margin-top:10px;display:none;" >
											<?php echo ($vo['analysis']); ?>
										</div>
									</div><?php endforeach; endif; ?>    	
							</div>
						</div><?php endif; ?>
				</div>
			</div>
			
		</div>
	</form>
	<div class="timeout-dialog-layout">
		<div id="timeout-dialog" class="modal in" aria-hidden="false" style="display: none;">
			<div class="modal-dialog modal-dialog-small">
				<div class="modal-content">
					<div class="modal-header">
						<h4 class="modal-title">考试结束</h4>
					</div>
					<div class="modal-body">
						<div class="well well-lg">
							<div class="empty">考试已结束，请点击下面的按钮查看结果~</div>
						</div>
					</div>
					<div class="modal-footer">
						<a href="/test/0/result" id="show_testpaper_result" class="btn btn-info">查看结果</a>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"  aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog" style="width:800px;">
		<div class="modal-content">
			<div class="modal-body"></div>
		</div>
	</div>
</div>

<script type="text/javascript"> 
$("#myModal").on("hidden", function() {
    $(this).removeData("modal");
});

</script>  
<script type="text/javascript">
 $(".analysis-btn").click(function(){ 
   var id=$(this).attr('id');
   var id1=parseInt(id)+parseInt(10000);
   var id2=parseInt(id)+parseInt(20000);
    $("#"+id).css('display','none');
    $("#"+id1).css('display','');
	$("#"+id2).css('display',''); 
}); 
$(".unanalysis-btn").click(function(){ 
   var id1=$(this).attr('id');
   var id=parseInt(id1)-parseInt(10000);
   var id2=parseInt(id1)+parseInt(10000);
    $("#"+id1).css('display','none');
    $("#"+id).css('display','');
	$("#"+id2).css('display','none'); 
}); 
$(".favorite-btn_1").click(function(){ 
   var id=$(this).attr('id');
   var shitiid=parseInt(id)-parseInt(60000);
   var unfavorite_1id=parseInt(id)+parseInt(10000);
   var unfavorite_id=parseInt(id)-parseInt(10000);
   $.ajax({ url:'<?php echo u('Exam/Shiti/adderrors');?>', 
		 type:"post", data:{'id':shitiid}, 
		 dataType:'json', 
		 success:function(data){
		    $("#"+id).css('display','none');
			$("#"+unfavorite_1id).css('display','none');
			$("#"+unfavorite_id).css('display','');
		   }
		}
	  );

}); 
$(".favorite-btn").click(function(){ 
   var id=$(this).attr('id');
   var shitiid=parseInt(id)-parseInt(40000);
   var unfavoriteid=parseInt(id)+parseInt(10000);
   $.ajax({ url:'<?php echo u('Exam/Shiti/adderrors');?>', 
		 type:"post", data:{'id':shitiid}, 
		 dataType:'json', 
		 success:function(data){
		    $("#"+id).css('display','none');
			$("#"+unfavoriteid).css('display','');
		   }
		}
	  );

}); 
$(".unfavorite-btn_1").click(function(){ 
   var id=$(this).attr('id');
   var shitiid=parseInt(id)-parseInt(70000);
   var favoriteid=parseInt(id)-parseInt(20000);
   var favorite_1id=parseInt(id)-parseInt(10000);
   $.ajax({ url:'<?php echo u('Exam/Shiti/dellerrors');?>', 
		 type:"post", data:{'id':shitiid}, 
		 dataType:'json', 
		 success:function(data){
		    $("#"+id).css('display','none');
			$("#"+favorite_1id).css('display','none');
			$("#"+favoriteid).css('display','');
		   }
		}
	  );

}); 
$(".unfavorite-btn").click(function(){ 
   var id=$(this).attr('id');
   var shitiid=parseInt(id)-parseInt(50000);
   var favoriteid=parseInt(id)-parseInt(10000);
   $.ajax({ url:'<?php echo u('Exam/Shiti/dellerrors');?>', 
		 type:"post", data:{'id':shitiid}, 
		 dataType:'json', 
		 success:function(data){
		    $("#"+id).css('display','none');
			$("#"+favoriteid).css('display','');
		   }
		}
	  );

}); 
</script> 
  <!--<div class="es-footer-link">
   <div class="container">
     <div class="row">
       <div class="col-md-12 footer-main clearfix">
       <?php if(is_array($dnav)): $i = 0; $__LIST__ = $dnav;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><div class="link-item ">
           <h3><?php echo ($vo['label']); ?></h3>
           <ul>
            <?php if(is_array($vo['voo'])): $i = 0; $__LIST__ = $vo['voo'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$sub): $mod = ($i % 2 );++$i;?><li><a href="<?php echo (sp_get_href($sub['href'])); ?>" target="_blank"><?php echo ($sub['label']); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
           </ul>
         </div><?php endforeach; endif; else: echo "" ;endif; ?>  
     </div>
    </div>
	<div class="fr_link">
	  <div class="yq_lk">
	     <h3>友情链接</h3>
		 <?php if(is_array($links)): $i = 0; $__LIST__ = $links;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><a href="<?php echo ($vo['link_url']); ?>"  target="<?php echo ($vo['link_target']); ?>" title="<?php echo ($vo['link_name']); ?>"><?php echo ($vo['link_name']); ?></a><?php endforeach; endif; else: echo "" ;endif; ?> 
	  </div>
	</div>       
  </div>
 </div>-->
<div class="layout fixed-bottom bg-main bg-inverse hidden-s  hidden-m hidden-b">
	<div class="container text-center padding-top padding-bottom">
        <div class="x3"><a class="icon-home" href="/yxtcmf/"> 首页</a></div>
        <div class="x3"><a class="icon-book" href="<?php echo U('Course/course/coursecenter');?>"> 课程</a></div>
        <div class="x3"><a class="icon-comments" href="<?php echo U('portal/index/article');?>"> 新闻</a></div>
        <div class="x3">
			<?php if(session('?user')): ?><a class="icon-user" href="<?php echo U('User/center/index');?>"> 我的</a>
			<?php else: ?>
			<a class="icon-user" href="<?php echo U('User/login/index');?>"> 我的</a><?php endif; ?>
		</div>
    </div>
</div>

<div class="container-layout">
    <div class="border-top padding-top">        
        <div class="text-center height-big margin">
           考试系统后端 @ 版权所有【2017-2020】
		</div>
    </div>
</div>
<!--<footer class="es-footer">
  <div class="copyright">
    <div class="container">设计开发： 
		<a href="/yxtcmf/" target="_blank"><?php echo ($site_name); ?></a>©2017-2020 <a class="mlm" href="/yxtcmf/" target="_blank"></a>      
    </div>
  </div>
</footer>-->    
</body>
</html>